package ferus.tigris.lines.Builders;

import java.util.ArrayList;
import java.util.List;

import ferus.tigris.lines.GameView;
import ferus.tigris.lines.views.ComposeSprite;
import ferus.tigris.lines.views.LinearSprite;
import ferus.tigris.lines.personages.AbstractBehavior;
import ferus.tigris.lines.personages.Cat;
import ferus.tigris.lines.personages.KillerBehavior;
import ferus.tigris.lines.personages.KillerWithEffectBehavior;
import ferus.tigris.lines.personages.Mark;
import ferus.tigris.lines.personages.ViewsManager;
import android.graphics.Bitmap;

public class CatBuilder extends AbstractBehaviorBuilder {

	protected CatBuilder() {
	}

	public AbstractBehavior create(GameView view) {
		List<LinearSprite>sprites = new ArrayList<LinearSprite>();
		
		Bitmap img = ImagesPool.instance(view).getCat1();
		sprites.add(new LinearSprite(img, 4, 30, 30));
		img = ImagesPool.instance(view).getCat2();
		sprites.add(new LinearSprite(img, 4, 30, 100));
		img = ImagesPool.instance(view).getCat3();
		sprites.add(new LinearSprite(img, 4, 30, 2000));
		
		ComposeSprite sprite = new ComposeSprite(sprites);
		
		Mark behavior = new Cat(null, view, view.gameField());
		ViewsManager viewManager = new ViewsManager(behavior, sprite); 
		KillerBehavior killer = new KillerWithEffectBehavior(viewManager); 
		return killer;
	}
}
